package io;
import java.io.*;
import net.mindview.util.*;
import java.text.*;
import java.util.*;
public class ModifiedAfter6 {
    public static void main(final String[] args) {
        if(args.length!=2){
            System.out.println("Usage: directory date(mm/dd/yyy)");
            System.out.println("(Outputs a listing  of all java files in the given directory"+
                    "\nthat were last modified on or after the given date.");
        }
        final SimpleDateFormat sdf=new SimpleDateFormat("MM/dd/yyy");
        new ProcessFiles(new ProcessFiles.Strategy() {
            @Override
            public void process(File file) {
                Date modDate=new Date(file.lastModified());
                try {
                    if(modDate.after(sdf.parse(args[1])))
                        System.out.println(file);
                }catch (ParseException e){
                    System.out.println(e.getMessage());
                }
            }
        },"java").start(args);
    }
}
